/**
 * @file pt_pcm_utils.h
 * @brief pcm 数据处理工具
 * @author yejiahao
 * @date 2024-06-24 02:17:10
 * 
 * @copyright Copyright (c) 2024 by 深圳市鹏天微智能科技有限公司, All Rights Reserved.
 */

#include "pt.h"

#ifndef PT_PCM_UTILS_H
#define PT_PCM_UTILS_H

#ifdef __cplusplus
extern "C" {
#endif

long pt_get_bin_size(const char *read_file);
int pt_read_pcm(const char *read_file, uint8_t **pcm);
int pt_save_pcm(const char *save_path, void *buffer, size_t len);

void pt_stereo2mono(const int16_t* src_audio, uint32_t src_frames, int16_t* dst_audio, uint32_t dst_frames);
void pt_mono2stereo(const int16_t *mono, const uint32_t mono_frames, int16_t *stereo, uint32_t stereo_frames);

#ifdef __cplusplus
}
#endif

#endif /* PT_PCM_UTILS_H */
